using System;
using System.Text;

namespace JelleDruyts.Mollom.Client
{
    /// <summary>
    /// Represents a captcha that was generated on the server-side.
    /// </summary>
    public sealed class Captcha
    {
        private readonly string url;

        /// <summary>
        /// Gets the URL of the generated captcha.
        /// </summary>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings")]
        public string Url
        {
            get { return this.url; }
        }

        private readonly string sessionId;

        /// <summary>
        /// Gets a unique ID to identify the current captcha session.
        /// </summary>
        public string SessionId
        {
            get { return this.sessionId; }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Captcha"/> class.
        /// </summary>
        /// <param name="url">The URL of the generated captcha.</param>
        /// <param name="sessionId">A unique ID to identify the current captcha session.</param>
        internal Captcha(string url, string sessionId)
        {
            this.url = url;
            this.sessionId = sessionId;
        }
    }
}